package com.atguigu.boot.service;

import com.atguigu.boot.entities.Customer;
import com.atguigu.boot.mapper.CustomerMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @ClassName CustomerService
 * @Description 此类描述:
 * @Author dangchen
 * @DateTime 2022-09-18 21:45
 * @Version 1.0
 */
@Service
public class CustomerService {

    @Resource
    private CustomerMapper customerMapper;

    public Integer add(Customer customer){
        return customerMapper.add(customer);
    }

    public Integer delete(Integer id){
        return customerMapper.delete(id);
    }

    public Integer update(Customer customer){
        return customerMapper.update(customer);
    }

    public Customer getCustomerById(Integer id){
        return customerMapper.getCustomerById(id);
    }
}
